<?php
/**
 * Created by PhpStorm.
 * User: xi
 * Date: 2020-05-02
 * Time: 16:54
 */

namespace app\api\service;


use app\admin\model\Roomclean;
use app\admin\model\Shoporderprofit;
use app\admin\model\Shoproombook;
use app\admin\model\Shopstaff;
use app\admin\model\Userorderprofit;
use app\admin\model\Usertuan;
use app\admin\model\Userwithdraw;

class MpService
{


    //申请加盟
    public function joinNotify($app, $param = array())
    {

        $ret = $app->template_message->send([
            'touser' => $param['openid'],
            'template_id' => 'h6TTm1_L4WYNv_ut_Nc9jw7kr1cPkJolW3PTLfu8sLU',
            'data' => [
                'thing1' => $param['name'],
                'time3' => $param['time'],

            ],
        ]);


    }


    /** 门店老板订单通知**/
    public function addOrderNotify($app, $param = array())
    {

        $ret = $app->template_message->send([
            'touser' => $param['openid'],
            'template_id' => 'fe2kSaFIVtUhCuQIcZftoLYjZB2-i331xs6a3tFMAeg',
            'miniprogram' => [
                'appid' => 'wx1ff50178a92f6e7d',
                'pagepath' => 'pages/order/detail?order_no=' . $param['order_no'],
            ],
            'data' => [
                'thing3' => $param['shop_name'],
                'thing8' => $param['room_name'],
                'thing16' => $param['mobile'],
                'amount14' => $param['amount'],
                'time9' => $param['book_start'],
            ],
        ]);
    }

}